/*
 ------------------------------------------------------------------------------
	winmad++ -	a test program for using SDL and mad library on Windows
				with object oriented UI style
				with low level mad (seek)

	Copyright (C) 2011 Pierre Veber
	
	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 3 of the License, or
	(at your option) any later version.
	
	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.
	
	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software Foundation,
	Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
------------------------------------------------------------------------------
*/

#pragma once

struct style_rect_t
{
	int top;
	int right;
	int bottom;
	int left;
};

inline style_rect_t make_rect_t(int a, int b, int c, int d)
{
    style_rect_t ret = { a, b, c, d };
    return ret;
}

#define STYLE_DISPLAY_NONE		(int)0
#define STYLE_DISPLAY_BLOCK		(int)1
#define STYLE_DISPLAY_INLINE	(int)2

class CStyle
{
public:

	CStyle();
	~CStyle();
	
	void parse(char* lpszStyle);

	char* lpszBackground;
	style_rect_t margin;
	style_rect_t padding;
	int width;
	int height;
	int top;
	int left;
	int fontsize;
	int display;
};

